<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<table border="0" width="200px">
  <tr>
    <th align="center" colspan="2">
      <s:text name="user.hello"/> <s:property value="#session.user"/>
    </th>
  </tr>   
  <s:if test="#session.cart.empty==false">
    <tr><th align="center" colspan="2"><s:text name="user.cart"/></th></tr>
    <tr>
      <td align="justify"><s:text name="cart.count"/></td>
      <td align="right"><s:property value="#session.cart.size"/></td>
    </tr>
    <tr>
      <td align="justify"><s:text name="cart.price"/></td>
      <td align="right"><s:property value="#session.cart.price"/>$</td>
    </tr>    
    <tr>
      <td align="center" colspan="2">
        <a href="<s:url action="ShowOrder"/>"><s:text name="order.header"/></a>
      </td>
    </tr>
  </s:if>
  <s:else>
    <tr><th colspan="2"><s:text name="cart.empty"/></th></tr>
  </s:else>
  <tr>
    <th align="left">
      <s:if test="#session.user.rights>0">
        <a href="<s:url action="ShowAdmin"/>"><s:text name="admin.page"/></a>
      </s:if>
      <s:elseif test="#session.user==null">
        <s:a action="ToRegistration.action"><s:text name="menu.registration"/></s:a>
      </s:elseif>
    </th>
    <th align="right">
      <s:if test="#session.user!=null">
        <s:a action="Exit.action"><s:text name="user.exit"/></s:a>
      </s:if>
      <s:else>
        <s:a action="ToLogin.action"><s:text name="menu.login"/></s:a>
      </s:else>
    </th>
  </tr>  
</table>
</body>
</html>